import gtk
import gtk.glade
from AddDoctorWindow import *
from DeleteDoctorWindow import *

class MainWindow:
	def __init__(self):
		gladefile="setup_pickup.glade"
		windowname="MainWindow"
		self.wTree=gtk.glade.XML (gladefile,windowname)
		dic = { "onDoctorAddClicked" : self.onDoctorAddClicked, 
			"onDoctorDeleteClicked" : self.onDoctorDeleteClicked,
			"delete_event" : self.delete_event
			}
		self.wTree.signal_autoconnect (dic)
		return
		
	def onDoctorAddClicked (self,widget):
		AddDoctorWindow()
		print "Add Clicked"
	def onDoctorDeleteClicked (self,widget):
		DeleteDoctorWindow()
		print "Delete Clicked"
		
	def delete_event(self, widget, event, data=None):
		gtk.main_quit()
		return False
		